package code;

import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;

import java.io.File;

public class GeneratorCode {

    public static void main(String[] args) throws Exception {
        ConfigurationParser cp  = new ConfigurationParser(null);
        Configuration config = cp.parseConfiguration(new File("C:\\Users\\Administrator\\Desktop\\MyBatis03\\resources\\generateConfig.xml"));
        DefaultShellCallback callback = new DefaultShellCallback(true);
        MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config,callback,null);
        myBatisGenerator.generate(null);
    }
}
